oa.view.rf.individualEquation = {
/**
 * Render the structure of an IndividualEquation
 * 
 * @author Gerd Wagner
 * @param {ArithmeticProblem} ap  An arithmetic problem.
 */
render: function (ap) {
  var el = {};
  var rB = document.getElementById("renderBox");
  var mainEl = dom.createDiv("individualEquation");
  mainEl.setAttribute("data-nmrofops", ap.type.operators.length);
  rB.appendChild( mainEl);
  // operand 1
  if (ap.type.askedFor === 1) {
    el = dom.createNumInput("askedFor","operand askedFor","operand1");
  }
  else {
    el = dom.createSpan("operand1","operand");
  }
  mainEl.appendChild( el);
  // further operator/operand pairs
  for (var i=2; i <= ap.operands.length; i++) {
    // operator
    el = dom.createSpan("operator"+(i-1),"operator");
    el.innerHTML = oa.view.operatorSymbols[ ap.type.operators[i-2]-1];
    mainEl.appendChild( el);
    // operand 
    if (ap.type.askedFor === i) {
      el = dom.createNumInput("askedFor","operand askedFor","operand"+i);
    }
    else {
      el = dom.createSpan("operand"+i,"operand");
    }
    mainEl.appendChild( el);
  }
  // equality symbol
  el = dom.createSpan("","equalitySymbol","=");
  mainEl.appendChild( el);
  // result
  if (ap.type.askedFor === 0) {
    el = dom.createNumInput("askedFor","operand askedFor","result");
  }
  else {
    el = dom.createSpan("result","operand");
  }
  mainEl.appendChild( el);
  // configure the input field
  el = document.getElementById("askedFor");
  el.setAttribute("autofocus", "autofocus");
  el.addEventListener("input", oa.view.handleUserInputEvents, false);
  // configure the submit/continue button
  el = dom.createButton("submitButton","blue","?");
  mainEl.appendChild( el);
  el.addEventListener("click", oa.view.handleClickSubmitButtonEvents, false);
  document.addEventListener("keypress", oa.view.handleKeyPressEvents, true);
},
/**
 * Fill an already rendered problem equation with new values for operands and result
 * 
 * @author Gerd Wagner
 * @param {ArithmeticProblem} ap  An arithmetic problem.
 */
fill: function (ap) {
  var askedFor = document.getElementById("askedFor");
  askedFor.value = ""; 
  askedFor.focus();
  // fill in all operands
  for (var i=1; i <= ap.operands.length; i++) {
    if (ap.type.askedFor !== i) { document.getElementById("operand"+i).innerHTML = ap.operands[i-1]; }
  }
  // result
  if (ap.type.askedFor !== 0) { document.getElementById("result").innerHTML = ap.result; }
}
};